import {Routes, RouterModule} from '@angular/router';
import {ModuleWithProviders} from '@angular/core';

import {ListComponent} from './list/list.component';
import {AddComponent} from './add/add.component';
import {EditComponent} from './edit/edit.component';
import {DetailComponent} from './detail/detail.component';



export const routes: Routes = [
  {
    path: 'list',
    component: ListComponent,
    children: []
  },
  {
    path: 'add',
    component: AddComponent,
    children: []
  },
  {
    path: 'edit/:id',
    component: EditComponent,
    children: []
  },
  {
    path: 'detail/:id',
    component: DetailComponent,
    children: []
  },
  {
    path: '',
    redirectTo: 'list',
    pathMatch: 'full'
  }
];

export const routing: ModuleWithProviders = RouterModule.forChild(routes);
